package com.jy.api.dao;

import com.jy.api.domain.StoreNumCount;
import org.springframework.data.repository.CrudRepository;

import java.util.Date;
import java.util.List;

public interface StoreNumCountDao  extends CrudRepository<StoreNumCount,Integer> {
    List<StoreNumCount> findByStoreIdAndAddTimeBetweenOrderByAddTimeAsc(String storeId, Date parse, Date parse1);

    long countByStoreIdAndAddTimeBetween(String storeId, Date parse, Date parse1);



    StoreNumCount findTop1ByStoreIdAndAddTimeBetweenOrderByAddTimeAsc(String storeId, Date parse, Date parse1);

    StoreNumCount findTop1ByStoreIdOrderByIdDesc(String storeId);


    StoreNumCount findTop1ByStoreIdAndAddTimeGreaterThanEqualOrderByOnlineCountDesc(String storeId,Date time);
}
